
import React, { Component } from 'react'
import {
  BrowserRouter,
  Switch,
   Route,
  NavLink
} from "react-router-dom"
import Home  from './views/Home'
import Class from './views/Class'
import Jingxi from './views/Jingxi'
import My from './views/My'
import ShopCar from './views/ShopCar'

import routerConfig from "./router/routerConfig"
import Routerview from "./router/RouterView"
import RouterLink from './router/RouterLink'
export class App extends Component {
  render() {
    return (
      <div className='App'>
      <BrowserRouter> 
     <header></header>
     <main>
       {/* <Switch>
         <Route path="/home" component={Home}></Route>
         <Route path="/classify" component={Class}></Route>
         <Route path="/jingxi" component={Jingxi}></Route>
         <Route path="/shopCar" component={ShopCar}></Route>
         <Route path="/my" component={My}></Route>
    
       </Switch> */}
       <Routerview routerConfig={routerConfig}></Routerview>
     </main>
     <footer>
       {/* <NavLink to="/home">首页</NavLink>
       <NavLink to="/classify">分类</NavLink>
       <NavLink to="/jingxi">惊喜</NavLink>
       <NavLink to="/shopCar">购物车</NavLink>
       <NavLink to="/my">我的</NavLink> */}
<RouterLink routerConfig={routerConfig}></RouterLink>

     </footer>
        
     </BrowserRouter>
      </div>
    )
  }
}

export default App
